From 0809fbef31f2ab27189ead8eb8124d05ad95189b Mon Sep 17 00:00:00 2001 From: Gianni Tedesco Date: Thu, 23 Sep 2010 19:16:00 +0100 Subject: [PATCH] xl: Fix stack corruption caused by non-terminated call to libxl__xs_writev Signed-off-by: Gianni Tedesco Tested-by: Christoph Egger Acked-by: Ian Jackson Signed-off-by: Ian Jackson --- tools/libxl/libxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 8b086b9123..4e1fd04284 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1718,7 +1718,7 @@ retry_transaction: vm_path = libxl__xs_read(&gc,t,libxl__sprintf(&gc, "%s/vm", p->dom_path)); if (vm_path) { /* Now write the vncpassword into it. */ - pass_stuff = libxl__calloc(&gc, 2, sizeof(char *)); + pass_stuff = libxl__calloc(&gc, 3, sizeof(char *)); pass_stuff[0] = "vncpasswd"; pass_stuff[1] = info->vncpasswd; libxl__xs_writev(&gc,t,vm_path,pass_stuff); -- 2.30.2